<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="CrossScrumTeamReport_AllSprints.aspx.cs" Inherits="CrossScrumTeamReport" Trace="false" Title="Tackle - Cross Scrum Team - All Sprints - Status Report" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentHolder" runat="Server">
    <strong>Cross Scrum Team - Product Lifecycle<br />
        <br />
    </strong><span style="font-size: 8pt">Setup the filter below for the status report.<br />
        <br />
    </span>
    <table width="98%" cellpadding="4" cellspacing="0">
        <tr>
            <td valign="top" rowspan="2">
                <span style="font-size: x-small"><strong>Studio:</strong><br />
                </span>
                <asp:DropDownList ID="ddStudioList" runat="server" AutoPostBack="True" DataSourceID="dsStudioList"
                    DataTextField="OwnerStudio" DataValueField="StudioParam" Font-Names="Verdana"
                    Font-Size="X-Small" OnDataBound="ddStudioList_DataBound" OnSelectedIndexChanged="ddStudioList_SelectedIndexChanged">
                </asp:DropDownList>
                <br />
                <br />
                <span style="font-size: x-small"><strong>Product:<br />
                </strong></span>
                <asp:DropDownList ID="ddListProduct" runat="server" AutoPostBack="True" DataSourceID="dsProductList"
                    DataTextField="ProductName" DataValueField="ProductVal" Font-Names="Verdana"
                    Font-Size="X-Small" OnDataBound="ddListProduct_DataBound" OnSelectedIndexChanged="ddListProduct_SelectedIndexChanged">
                </asp:DropDownList>
                <br />
            </td>
            <td rowspan="2" valign="top" style="font-size: 10pt">
                <rsweb:ReportViewer ID="repViewWeeklyStatus" runat="server" Font-Names="Verdana"
                    Font-Size="8pt" Height="375px" Width="100%">
                    <LocalReport ReportPath="CrossScrumTeamReport_AllSprints.rdlc">
                        <DataSources>
                            <rsweb:ReportDataSource DataSourceId="odsScrumTeamPrefs" Name="DataSet1_ScrumTeamPrefs" />
                            <rsweb:ReportDataSource DataSourceId="odsWorkCompleted" Name="DataSet1_WorkCrossScrumTeam_AllSprints" />
                            <rsweb:ReportDataSource DataSourceId="odsWorkFeaturesNotCompleted" Name="DataSet1_WorkRemainingCrossScrumTeamFromProductBacklog" />
                        </DataSources>
                    </LocalReport>
                </rsweb:ReportViewer>
                <asp:ObjectDataSource ID="odsWorkCompleted" runat="server" SelectMethod="GetData"
                    TypeName="DataSet1TableAdapters.WorkCrossScrumTeam_AllSprintsTableAdapter" OnSelecting="odsWorkCompleted_Selecting" OldValuesParameterFormatString="original_{0}">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="ddStudioList" Name="StudioNameVal" PropertyName="SelectedValue"
                            Type="String" />
                        <asp:ControlParameter ControlID="ddListProduct" Name="ProductVal" PropertyName="SelectedValue"
                            Type="String" />
                        <asp:SessionParameter Name="DiscFilt" SessionField="CSTR_DiscFilt" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <asp:ObjectDataSource ID="odsWorkFeaturesNotCompleted" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="GetData" TypeName="DataSet1TableAdapters.WorkRemainingCrossScrumTeamFromProductBacklogTableAdapter">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="ddListProduct" Name="ProductVal" PropertyName="SelectedValue"
                            Type="String" />
                        <asp:ControlParameter ControlID="ddStudioList" Name="StudioNameVal" PropertyName="SelectedValue"
                            Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <asp:ObjectDataSource ID="odsScrumTeamPrefs" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="GetData" TypeName="DataSet1TableAdapters.ScrumTeamPrefsTableAdapter">
                    <SelectParameters>
                        <asp:SessionParameter Name="ScrumTeamID" SessionField="ScrumTeamID" Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                &nbsp; &nbsp;
                &nbsp; &nbsp; &nbsp;&nbsp;
            </td>
        </tr>
        <tr style="font-size: 10pt">
        </tr>
        <tr style="font-size: 10pt">
        </tr>
    </table>
    <span style="font-size: x-small"><span style="font-size: x-small"><em>
        <br />
        Note: Discovered tasks not associated with a sprint backlog item will be added to
        the status report only when a product is selected and the name of the product is
        found in the discovered work item. Discovered work associated with a sprint backlog
        item is automatically added to the report.</em></span><br />
        <asp:SqlDataSource ID="dsGetSprintNames" runat="server" ConnectionString="<%$ ConnectionStrings:TackleConnectionStringMain %>"
            SelectCommand="SELECT DISTINCT tblMasterBacklogSchedule.SprintName, tblMasterBacklogSchedule.EndDate, tblSprint.SprintID FROM tblSprint LEFT OUTER JOIN tblSprintBacklog ON tblSprint.SprintID = tblSprintBacklog.fSprintID RIGHT OUTER JOIN tblMasterBacklogSchedule ON tblSprint.fMasterBacklogScheduleID = tblMasterBacklogSchedule.MasterBacklogScheduleID WHERE (tblMasterBacklogSchedule.fScrumTeamID = @ScrumTeamID) AND (tblSprintBacklog.fSprintID IS NOT NULL) ORDER BY tblMasterBacklogSchedule.EndDate DESC">
            <SelectParameters>
                <asp:SessionParameter Name="ScrumTeamID" SessionField="ScrumTeamID" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="dsStudioList" runat="server" ConnectionString="<%$ ConnectionStrings:TackleConnectionStringMain %>"
            SelectCommand="SELECT DISTINCT OwnerStudio, OwnerStudio AS StudioParam FROM tblProducts UNION SELECT ' All' AS OwnerStudio, '%' AS StudioParam ORDER BY OwnerStudio">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="dsProductList" runat="server" ConnectionString="<%$ ConnectionStrings:TackleConnectionStringMain %>"
            SelectCommand="SELECT ProductName, ProductName AS ProductVal FROM tblProducts WHERE (OwnerStudio = @StudioName) UNION SELECT ' All' AS Productname, '%' AS ProductVal ORDER BY ProductName">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddStudioList" Name="StudioName" PropertyName="SelectedValue" />
            </SelectParameters>
        </asp:SqlDataSource>
    </span>
</asp:Content>
